<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>SSH框架</title>
	
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  <script type="text/javascript" src="JS/jquery-1.6.4.js"></script>
  <script type="text/javascript" >
	$(function(){
		$("#button").click(function(){
			var startTime = $("#startTime").val();
			var endTime = $("#endTime").val();
			$.ajax({
			   type: "POST",
			   url: "login!timeManagement.action",
			   data:{"startTime":startTime,"endTime":endTime} ,
			   dataType:'html',
			   success: function(returnData){
			   alert( "Data Saved: " + returnData );
			    }
			});
		});
	});
  </script>
  <body>
     <h1>spring和struts的集成（第一种方案）</h1>
    <hr>
    <a href="<%=path %>/index.action">登录</a><br/>
    
    	开始时间：<input type="text" id="startTime"/><br/>
  		结束时间：<input type="text" id="endTime"/>
  		<input type="submit" id="button" value="提交"/>
  </body>
</html>
